package ai.people.netmon.framework.domain.key.account.enums;

import ai.people.netmon.framework.domain.key.account.entity.intimacy.RedditIntimacy;
import ai.people.netmon.framework.domain.key.account.entity.intimacy.TelegramIntimacy;
import ai.people.netmon.framework.domain.key.account.entity.intimacy.TwitterIntimacy;

/**
 * @author zhenglin
 * @date 2022/7/28
 */
public enum IntimacySupportEnum {
    /**
     * 推特
     */
    TWITTER("twitter", TwitterIntimacy.class),
    TELEGRAM("telegram", TelegramIntimacy.class),
    REDDIT("reddit", RedditIntimacy.class),
    ;

    public String value;
    public Class intimacyClass;

    IntimacySupportEnum(String value, Class intimacyClass) {
        this.value = value;
        this.intimacyClass = intimacyClass;
    }

    public static Class getClassByValue(String value) {
        for (IntimacySupportEnum e : values()) {
            if (e.value.equals(value)) {
                return e.intimacyClass;
            }
        }
        return null;
    }
}
